<template>
  <div class="about">
    <div class="about-content">
      <h1>鬼人正邪</h1>
      <div class="image-container">
        <img
          src="https://i.bobopic.com/small/96832146.jpg"
          alt="鬼人正邪"
          class="character-image"
          @error="handleImageError"
        />
      </div>
      <p class="description">东方Project的角色，她很可爱</p>
    </div>
  </div>
</template>

<script setup lang="ts">
const handleImageError = (event: Event) => {
  const img = event.target as HTMLImageElement
  // 如果图片加载失败，使用备用图片链接
  img.src = 'https://th.bing.com/th/id/OIP.placeholder'
}
</script>

<style scoped>
.about {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  padding: 20px;
}

.about-content {
  text-align: center;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
}

.about-content h1 {
  color: #2c3e50;
  margin-bottom: 30px;
  font-size: 2.5rem;
  font-weight: 600;
}

.image-container {
  margin: 30px 0;
}

.character-image {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.character-image:hover {
  transform: scale(1.05);
}

.description {
  color: #6c757d;
  font-size: 1.1rem;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .about-content {
    padding: 20px;
  }

  .about-content h1 {
    font-size: 2rem;
  }
}
</style>
